#pragma once

#ifndef NULL
#define NULL 0
#endif

#include <string>

#define random(x, y) \
	( (x) + (rand()%((y)-(x)+1)) )

#define randomf(x, y) \
	( (x) + (((float_t)rand()/RAND_MAX)*((y)-(x))) )

#define round(x) \
	( ((x)>0.0f)?((int32_t)((x)+0.5f)):((int32_t)((x)-0.5f)) )

namespace PRO
{
	typedef std::string string_t;
	typedef float float_t;

	typedef char int8_t;
	typedef short int16_t;
	typedef long int32_t;

	typedef unsigned char uint8_t;
	typedef unsigned short uint16_t;
	typedef unsigned long uint32_t;
};

typedef unsigned long       DWORD;
typedef int                 BOOL;
typedef unsigned char       BYTE;
typedef unsigned short      WORD;
typedef float               FLOAT;
typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned int dword;
typedef unsigned int uint;
typedef unsigned long ulong;